private function MySQLtoSQLite(src:String):String
		{
			//trace("Main::MySQLtoSQLite");
			var i:int = 0;
			
			
			//rmv comments
			//src = src.replace(/--.*/gi, ""); //@FIXME
			src = src.replace(/\/\*.+?\*\/;/gis, "");
			
			

			
			//weird MySQL quotes
			src = src.replace(/`/gi, "\"");
			
			//rmv MySQL COMMENTs ... should also match   COMMENT 'blah')
			src = src.replace(/COMMENT .+?(\"|\')\s*?,/gi, ",");			
			
			//removes line breaks between "),("
			//it helps for replacing INSERT INTOs later
			src = src.replace(/\),\s\(/gis, "),(");
			
			//
			src = src.replace(/SET SQL_MODE=.+/gi, "");
			
			//Only work with CREATE TABLE
			var creates:Array = src.match(/CREATE TABLE .+?;/gis);
			var createsLen:int = creates.length;
			var oldCreate:String, newCreate:String;
			var tblName:String;
			
			for (i = 0; i < createsLen; i++) 
			{
				oldCreate = newCreate = creates[i];
				
				tblName = oldCreate.replace(/CREATE TABLE\s*['|"](\w+)['|"].*/is, "$1");
				
				if (excludeTables.indexOf(tblName) > -1)
				{
					src = src.replace(oldCreate, "");
					continue;
				}
				
				//rmv table type
				newCreate = newCreate.replace(/(ENGINE|TYPE)=(MyISAM|InnoDB|IBMDB21|MERGE|MEMORY|EXAMPLE|FEDERATED|ARCHIVE|CSV|BLACKHOLE)/gi, "");
				
				//int(n) --> INTEGER
				newCreate = newCreate.replace(/(tiny|small|medium|big)?int\(\d+\)/gi, "INTEGER");
				
				//timestamp -> DATETIME
				//for now timestamp -> varchar, @todo
				//http://www.arckid.com/blog/flash/support-for-timestamp-in-sqlite-with-air-as-local-database/
				newCreate = newCreate.replace(/default\s+?CURRENT_TIMESTAMP/gi, "");
				newCreate = newCreate.replace(/timestamp/gis, "varchar(255)");
				
				//rmv auto_increment
				newCreate = newCreate.replace(/auto_increment(=\d+)?/gi, "");
				
				//rmv UNIQUE_KEY...
				newCreate = newCreate.replace(/,(\s+)?UNIQUE KEY.+?\(.+?\)/gis, "");
				
				//and replace with PRIMARY KEY
				//newCreate = newCreate.replace(//gi, "");			
							
				//charset stuff
				newCreate = newCreate.replace(/(DEFAULT\s+)?(CHARSET|CHARACTER SET)\s*=?\s*\w+/gi, "");
				
				//collate
				newCreate = newCreate.replace(/(DEFAULT\s+)?COLLATE\s*=?\s*\w+/gi, "");
				
				//trace(newCreate)
				src = src.replace(oldCreate, newCreate);
			}
			
			
			//RAND -> RANDOM
			src = src.replace(/RAND\((\d+)\)/gi, "RANDOM($1)");
			
			//multiple insert into are not possible in SQLite....
			var inserts:Array = src.match(/INSERT INTO.*?VALUES.*?;/gis);
			
			var insertsLen:int = inserts.length;
			var oldInsert:String, newInsert:String;
			var spl:Array;
			var insertRows:Array;
			var insertRowsLen:int;
			
			for (i = 0; i < insertsLen; i++) 
			{
				oldInsert = inserts[i];
				newInsert = "";
				
				tblName = oldInsert.replace(/INSERT INTO\s*['|"](\w+)['|"].*/is, "$1");
				
				
				if (excludeTables.indexOf(tblName) > -1)
				{
					src = src.replace(oldInsert, "");
					continue;
				}
				
				
				spl = oldInsert.split("VALUES");
				spl[0] = spl[0] + "VALUES ";

				insertRows = spl[1].match(/\(.+?\)(,|;)/gi);
				insertRowsLen = insertRows.length;
				
				for (var j:int = 0; j < insertRowsLen; j++) 
				{			
					newInsert += spl[0];
					newInsert += insertRows[j].replace(/(,|;)$/gi, "") + ";\n";
				}
				
				src = src.replace(oldInsert, newInsert);
			}
			
			//remove blank lines
			//src = src.replace(/;/gis, ";\n");
			src = src.replace(/\r{2,}/gis, "\r\r");
			src = src.replace(/\n{2,}/gis, "\r\r");
			
			
			//remove whtespace at the end of file
			src = src.replace(/;\s*?$/gis, ";");
			
			return src;
		}